package com.study.algorithm.base.graph.model;

import java.util.ArrayList;

/**
 * Graph Node
 *
 * @author wanghuilong
 * @version 1.0
 * @date 2022/8/4 8:39 下午
 */
public class GraphNode {


    public int value;
    /**
     * the count of edge which point to this node
     */
    public int in;
    /**
     * the count of edge which from this node
     */
    public int out;
    /**
     * those nodes which through these from this node's edges can reach
     */
    public ArrayList<GraphNode> nexts;

    /**
     * those edges which from this node
     */
    public ArrayList<GraphEdge> edges;


    public GraphNode(int value) {
        this.value = value;
        in = 0;
        out = 0;
        nexts = new ArrayList<>();
        edges = new ArrayList<>();
    }
}
